const webpack = require('webpack')
const {merge} = require('webpack-merge')
const webpackCommon = require('./webpack.common.js')
 
module.exports = merge(webpackCommon, {
    mode: 'development',
    devtool: 'cheap-module-eval-source-map',
    devServer: {
        contentBase: './public',
        watchContentBase: true,
        proxy: {
            '/api': {
                // target: 'https: //api.github.com',
                // http://localhost:8080/api/users -> https://api.github.com/users
                // pathRewrite: {
                //     '^/api': ''
                // },
                changeOrigin: true
            }
        }
    }
})